#include "CustomService.h"
#include "ServiceHandle.h"


CustomService::CustomService(int argc, char **argv)
    : QtService<QCoreApplication>(argc, argv, "CustomQtServer")
{
    setServiceDescription("Custom Qt Server");
    setServiceFlags(QtServiceBase::CanBeSuspended);
}

void CustomService::DoClean()
{
    SERVER_CTRL_INST.DoClean();
}

void CustomService::start()
{
    QCoreApplication *app = application();

    SERVER_CTRL_INST.start();
}

void CustomService::pause()
{
    SERVER_CTRL_INST.pause();
}

void CustomService::resume()
{
    SERVER_CTRL_INST.resume();
}

void CustomService::stop()
{
    SERVER_CTRL_INST.stop();
}
